/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package entityprojet;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author T.Ron
 */
@Entity
@Table(name = "USERDBC")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Userdbc.findAll", query = "SELECT u FROM Userdbc u"),
    @NamedQuery(name = "Userdbc.findByIdUserdbc", query = "SELECT u FROM Userdbc u WHERE u.idUserdbc = :idUserdbc"),
    @NamedQuery(name = "Userdbc.findByUsername", query = "SELECT u FROM Userdbc u WHERE u.username = :username"),
    @NamedQuery(name = "Userdbc.findByPassword", query = "SELECT u FROM Userdbc u WHERE u.password = :password")})
public class Userdbc implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "ID_USERDBC")
    private Integer idUserdbc;
    @Column(name = "USERNAME")
    private String username;
    @Column(name = "PASSWORD")
    private String password;

    public Userdbc() {
    }

    public Userdbc(Integer idUserdbc) {
        this.idUserdbc = idUserdbc;
    }

    public Userdbc(String username, String password) {
        this.username = username;
        this.password = password;
    }

    
    public Integer getIdUserdbc() {
        return idUserdbc;
    }

    public void setIdUserdbc(Integer idUserdbc) {
        this.idUserdbc = idUserdbc;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idUserdbc != null ? idUserdbc.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Userdbc)) {
            return false;
        }
        Userdbc other = (Userdbc) object;
        if ((this.idUserdbc == null && other.idUserdbc != null) || (this.idUserdbc != null && !this.idUserdbc.equals(other.idUserdbc))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "entityprojet.Userdbc[ idUserdbc=" + idUserdbc + " ]";
    }
    
}
